
class Person{
    private String name;//这条语句是封装好的，看不到
    public int age;

    public void setName(String name) {
        this.name = name;
    }

    public void showName(String name) {
        System.out.println(name + "->" + age);
    }

    public String getName() {
        return this.name;
    }
}
public class Work {
    public static void main(String[] args) {
        Person person = new Person();
        person.setName("zhangsan");
        System.out.println(person.getName());
    }
}
